#include "datasubip.h"
#include "ipsubservice.h"

DataSubIp::DataSubIp()
{
    index = 0;
    id = "";
    ip = "";
    port = 0;
    name ="";
    actived = false;
    local = true;
}
void DataSubIp::buildConnect(){
    if(local)
        actived = true;
}
bool DataSubIp::updateInfo(DataModel *model){
    if(local)
        return true;
    else{
        return true;
    }
}
DataModel* DataSubIp::queryInfo(DataModel *model){
    if(local)
        return model;
    else{
        return model;
    }
}
bool DataSubIp::delGame(int id){
    if(local){
        IpSubService ser ;
        return ser.delGame(id);
    }else{
        return true;
    }
}
bool DataSubIp::openGame(int id){
    if(local){
        IpSubService ser ;
        return  ser.openGame(id);
    }
    else{
        return true;
    }
}
bool DataSubIp::closeGame(int id){
    if(local){
        IpSubService ser ;
        return ser.closeGame(id);
    }   else{
        return true;
    }
}
bool DataSubIp::updateFile(int id,int flag){
    if(local){
        IpSubService ser ;
        return ser.updateFile(id,flag);
    }else{
        return true;
    }
}
